home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 1998 November / IRIX 6.5.2 Base Documentation November 1998.img / usr / share / catman / g_man / cat3 / OpenGL-ftn / fglfeedbackbuffer.z / fglfeedbackbuffer
Text File  |  1998-10-20  |  16KB  |  265 lines

  1.  
  2.  
  3.  
  4. ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))          OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee          ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr - controls feedback mode
  10.  
  11.  
  12. FFFFOOOORRRRTTTTRRRRAAAANNNN SSSSPPPPEEEECCCCIIIIFFFFIIIICCCCAAAATTTTIIIIOOOONNNN
  13.      SUBROUTINE ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr( INTEGER*4 _s_i_z_e,
  14.                                    INTEGER*4 _t_y_p_e,
  15.                                    CHARACTER*8 _b_u_f_f_e_r )
  16.  
  17.  
  18. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
  19.      _s_i_z_e    Specifies the maximum number of values that can be written into
  20.              _b_u_f_f_e_r.
  21.  
  22.      _t_y_p_e    Specifies a symbolic constant that describes the information that
  23.              will be returned for each vertex.  GGGGLLLL____2222DDDD, GGGGLLLL____3333DDDD, GGGGLLLL____3333DDDD____CCCCOOOOLLLLOOOORRRR,
  24.              GGGGLLLL____3333DDDD____CCCCOOOOLLLLOOOORRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE, and GGGGLLLL____4444DDDD____CCCCOOOOLLLLOOOORRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE are accepted.
  25.  
  26.      _b_u_f_f_e_r  Returns the feedback data.
  27.  
  28. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  29.      The ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr function controls feedback.  Feedback, like
  30.      selection, is a GL mode.  The mode is selected by calling ffffggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee
  31.      with GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK.  When the GL is in feedback mode, no pixels are
  32.      produced by rasterization.  Instead, information about primitives that
  33.      would have been rasterized is fed back to the application using the GL.
  34.  
  35.      ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr has three arguments:  _b_u_f_f_e_r is a pointer to an array
  36.      of floating-point values into which feedback information is placed.  _s_i_z_e
  37.      indicates the size of the array.  _t_y_p_e is a symbolic constant describing
  38.      the information that is fed back for each vertex.  ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr must
  39.      be issued before feedback mode is enabled (by calling ffffggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee with
  40.      argument GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK).  Setting GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK without establishing the
  41.      feedback buffer, or calling ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr while the GL is in feedback
  42.      mode, is an error.
  43.  
  44.      When ffffggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee is called while in feedback mode, it returns the
  45.      number of entries placed in the feedback array, and resets the feedback
  46.      array pointer to the base of the feedback buffer. The returned value
  47.      never exceeds _s_i_z_e. If the feedback data required more room than was
  48.      available in _b_u_f_f_e_r, ffffggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee returns a -1.  To take the GL out of
  49.      feedback mode, call ffffggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee with a parameter value other than
  50.      GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK.
  51.  
  52.      While in feedback mode, each primitive, bitmap, or pixel rectangle that
  53.      would be rasterized generates a block of values that are copied into the
  54.      feedback array.  If doing so would cause the number of entries to exceed
  55.      the maximum, the block is partially written so as to fill the array (if
  56.      there is any room left at all), and an overflow flag is set.  Each block
  57.      begins with a code indicating the primitive type, followed by values that
  58.      describe the primitive's vertices and associated data.  Entries are also
  59.      written for bitmaps and pixel rectangles.  Feedback occurs after polygon
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))          OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee          ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))
  71.  
  72.  
  73.  
  74.      culling and ffffggggllllPPPPoooollllyyyyggggoooonnnnMMMMooooddddeeee interpretation of polygons has taken place, so
  75.      polygons that are culled are not returned in the feedback buffer.  It can
  76.      also occur after polygons with more than three edges are broken up into
  77.      triangles, if the GL implementation renders polygons by performing this
  78.      decomposition.
  79.  
  80.      The ffffggggllllPPPPaaaassssssssTTTThhhhrrrroooouuuugggghhhh command can be used to insert a marker into the
  81.      feedback buffer.  See ffffggggllllPPPPaaaassssssssTTTThhhhrrrroooouuuugggghhhh.
  82.  
  83.      Following is the grammar for the blocks of values written into the
  84.      feedback buffer.  Each primitive is indicated with a unique identifying
  85.      value followed by some number of vertices.  Polygon entries include an
  86.      integer value indicating how many vertices follow.  A vertex is fed back
  87.      as some number of floating-point values, as determined by _t_y_p_e.  Colors
  88.      are fed back as four values in RGBA mode and one value in color index
  89.      mode.
  90.  
  91.           feedbackList <- feedbackItem feedbackList | feedbackItem
  92.  
  93.           feedbackItem <- point | lineSegment | polygon | bitmap |
  94.           pixelRectangle | passThru
  95.  
  96.           point <- GGGGLLLL____PPPPOOOOIIIINNNNTTTT____TTTTOOOOKKKKEEEENNNN vertex
  97.  
  98.           lineSegment <- GGGGLLLL____LLLLIIIINNNNEEEE____TTTTOOOOKKKKEEEENNNN vertex vertex | GGGGLLLL____LLLLIIIINNNNEEEE____RRRREEEESSSSEEEETTTT____TTTTOOOOKKKKEEEENNNN
  99.           vertex vertex
  100.  
  101.           polygon <- GGGGLLLL____PPPPOOOOLLLLYYYYGGGGOOOONNNN____TTTTOOOOKKKKEEEENNNN n polySpec
  102.  
  103.           polySpec <- polySpec vertex | vertex vertex vertex
  104.  
  105.           bitmap <- GGGGLLLL____BBBBIIIITTTTMMMMAAAAPPPP____TTTTOOOOKKKKEEEENNNN vertex
  106.  
  107.           pixelRectangle <- GGGGLLLL____DDDDRRRRAAAAWWWW____PPPPIIIIXXXXEEEELLLL____TTTTOOOOKKKKEEEENNNN vertex | GGGGLLLL____CCCCOOOOPPPPYYYY____PPPPIIIIXXXXEEEELLLL____TTTTOOOOKKKKEEEENNNN
  108.           vertex
  109.  
  110.           passThru <- GGGGLLLL____PPPPAAAASSSSSSSS____TTTTHHHHRRRROOOOUUUUGGGGHHHH____TTTTOOOOKKKKEEEENNNN value
  111.  
  112.           vertex <- 2d | 3d | 3dColor | 3dColorTexture | 4dColorTexture
  113.  
  114.           2d <- value value
  115.  
  116.           3d <- value value value
  117.  
  118.           3dColor  <- value value value color
  119.  
  120.           3dColorTexture <- value value value color tex
  121.  
  122.           4dColorTexture <- value value value value color tex
  123.  
  124.           color <- rgba | index
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))          OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee          ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))
  137.  
  138.  
  139.  
  140.           rgba <- value value value value
  141.  
  142.           index <- value
  143.  
  144.           tex <- value value value value
  145.  
  146.  
  147.      _v_a_l_u_e is a floating-point number, and _n is a floating-point integer
  148.      giving the number of vertices in the polygon.  GGGGLLLL____PPPPOOOOIIIINNNNTTTT____TTTTOOOOKKKKEEEENNNN,
  149.      GGGGLLLL____LLLLIIIINNNNEEEE____TTTTOOOOKKKKEEEENNNN, GGGGLLLL____LLLLIIIINNNNEEEE____RRRREEEESSSSEEEETTTT____TTTTOOOOKKKKEEEENNNN, GGGGLLLL____PPPPOOOOLLLLYYYYGGGGOOOONNNN____TTTTOOOOKKKKEEEENNNN, GGGGLLLL____BBBBIIIITTTTMMMMAAAAPPPP____TTTTOOOOKKKKEEEENNNN,
  150.      GGGGLLLL____DDDDRRRRAAAAWWWW____PPPPIIIIXXXXEEEELLLL____TTTTOOOOKKKKEEEENNNN, GGGGLLLL____CCCCOOOOPPPPYYYY____PPPPIIIIXXXXEEEELLLL____TTTTOOOOKKKKEEEENNNN and GGGGLLLL____PPPPAAAASSSSSSSS____TTTTHHHHRRRROOOOUUUUGGGGHHHH____TTTTOOOOKKKKEEEENNNN are
  151.      symbolic floating-point constants.  GGGGLLLL____LLLLIIIINNNNEEEE____RRRREEEESSSSEEEETTTT____TTTTOOOOKKKKEEEENNNN is returned
  152.      whenever the line stipple pattern is reset.  The data returned as a
  153.      vertex depends on the feedback _t_y_p_e.
  154.  
  155.      The following table gives the correspondence between _t_y_p_e and the number
  156.      of values per vertex.  _k is 1 in color index mode and 4 in RGBA mode.
  157.  
  158.           _t_y_p_e           _c_o_o_r_d_i_n_a_t_e_s   _c_o_l_o_r   _t_e_x_t_u_r_e   _t_o_t_a_l _n_u_m_b_e_r _o_f _v_a_l_u_e_s
  159.    ____________________________________________________________________________
  160.           GGGGLLLL____2222DDDD             _x, _y                                   2
  161.           GGGGLLLL____3333DDDD            _x, _y, _z                                 3
  162.        GGGGLLLL____3333DDDD____CCCCOOOOLLLLOOOORRRR         _x, _y, _z       k                        3+k
  163.    GGGGLLLL____3333DDDD____CCCCOOOOLLLLOOOORRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE    _x, _y, _z,       k        4               7+k
  164.    GGGGLLLL____4444DDDD____CCCCOOOOLLLLOOOORRRR____TTTTEEEEXXXXTTTTUUUURRRREEEE   _x, _y, _z, _w      k        4               8+k
  165.  
  166.  
  167.      Feedback vertex coordinates are in window coordinates, except _w, which is
  168.      in clip coordinates.  Feedback colors are lighted, if lighting is
  169.      enabled.  Feedback texture coordinates are generated, if texture
  170.      coordinate generation is enabled.  They are always transformed by the
  171.      texture matrix.
  172.  
  173. NNNNOOOOTTTTEEEESSSS
  174.      ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr, when used in a display list, is not compiled into the
  175.      display list but is executed immediately.
  176.  
  177. EEEERRRRRRRROOOORRRRSSSS
  178.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____EEEENNNNUUUUMMMM is generated if _t_y_p_e is not an accepted value.
  179.  
  180.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____VVVVAAAALLLLUUUUEEEE is generated if _s_i_z_e is negative.
  181.  
  182.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr is called while
  183.      the render mode is GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK, or if ffffggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee is called with
  184.      argument GGGGLLLL____FFFFEEEEEEEEDDDDBBBBAAAACCCCKKKK before ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr is called at least once.
  185.  
  186.      GGGGLLLL____IIIINNNNVVVVAAAALLLLIIIIDDDD____OOOOPPPPEEEERRRRAAAATTTTIIIIOOOONNNN is generated if ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr is executed
  187.      between the execution of ffffggggllllBBBBeeeeggggiiiinnnn and the corresponding execution of
  188.      ffffggggllllEEEEnnnndddd.
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202. ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))          OOOOppppeeeennnnGGGGLLLL RRRReeeeffffeeeerrrreeeennnncccceeee          ffffggggllllFFFFeeeeeeeeddddbbbbaaaacccckkkkBBBBuuuuffffffffeeeerrrr((((3333GGGG))))
  203.  
  204.  
  205.  
  206. AAAASSSSSSSSOOOOCCCCIIIIAAAATTTTEEEEDDDD GGGGEEEETTTTSSSS
  207.      ffffggggllllGGGGeeeetttt with argument GGGGLLLL____RRRREEEENNNNDDDDEEEERRRR____MMMMOOOODDDDEEEE
  208.  
  209. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  210.      ffffggggllllBBBBeeeeggggiiiinnnn, ffffggggllllLLLLiiiinnnneeeeSSSSttttiiiipppppppplllleeee, ffffggggllllPPPPaaaassssssssTTTThhhhrrrroooouuuugggghhhh, ffffggggllllPPPPoooollllyyyyggggoooonnnnMMMMooooddddeeee, ffffggggllllRRRReeeennnnddddeeeerrrrMMMMooooddddeeee,
  211.      ffffggggllllSSSSeeeelllleeeeccccttttBBBBuuuuffffffffeeeerrrr
  212.  
  213.  
  214.  
  215.  
  216.  
  217.  
  218.  
  219.  
  220.  
  221.  
  222.  
  223.  
  224.  
  225.  
  226.  
  227.  
  228.  
  229.  
  230.  
  231.  
  232.  
  233.  
  234.  
  235.  
  236.  
  237.  
  238.  
  239.  
  240.  
  241.  
  242.  
  243.  
  244.  
  245.  
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.                                                                         PPPPaaaaggggeeee 4444
  262.  
  263.  
  264.  
  265.